Assesslets

Assesslets are used to predict test results based on specific check rules by means of time intervals, context intervals and assessment variables, see Test Assessment - Time and Context Intervals and Test Assessment - Assessment Variables. They can be considered as single, small evaluation methods which return a test result. An assesslet can have one of the following results:

passed predicted result was met
failed predicted result was not met
inconclusive assessment was not executed due to conditional settings
execution error the assessment was not executed due to an execution error; for example, a precondition of an assesslet could not be calculated; an undefined signal or an erroneous syntax was used

An execution error will stop an assesslet immediately. All other assesslets are nevertheless executed. The execution error message is displayed in the Build Progress dialog.

There are many different assesslets, which consider different aspects of the test assessment, see Assesslet Types.

The assesslets are added, removed, or rearranged in the Assesslets view, see Views - Assesslets View.

The content of an assesslet is edited in the Assesslet Content view, see Views - Assesslet Content. All assesslets support units, see Units, and syntax highlighting. Instead of entering assesslet definitions manually, you can use the environment variable ${tpt.scenario.attribute.<attribute_name>} to enter the value of a Test Case Details view attribute. The Test Case Details view attribute value can be different from test case to test case, see Project Documentation - Test Case Details.

Trigger rule is run only when "sig_1" equals thetest case attribute value of "foo"

Assesslets can be linked to variants, test cases, and requirements.

The following environment variables can be used in assesslets:

Environment variable Description
${<name of project variable>} returns the value of the project specific variable, see Project Preferences - Variables
${tpt.scenario.execindex} returns in which order several test cases have been executed
${tpt.scenario.attribute.<attribute_name>} returns the value of the test case attribute, see Project Documentation - Test Case Details
${tpt.scenario.id} returns the ID of the test case
${tpt.scenario.externalid} returns the external ID of the test case
${tpt.timeout} returns the platform specific timeout
${tpt.scenario.name} returns the name of the test case
${tpt.scenario.dir} returns the path o the test case result
${HOMEPATH} returns the Windows path tothe user's home directory, see Windows environment variables
${COMPUTERNAME} returns the Windows computer name
${TIME} returns the Windows time
${DATE} returns the Windows date
Use TPT.getEnvVariable() instead of ${}, for example TPT.getEnvVariable('tpt.scenario.execindex') instead of ${tpt.scenario.execindex}, so in case the variable is not available, the test won't stop or through an execution error..

To see which assesslets are linked to a variant or test case, right-click on a variant or test case in the Project view, and select Used Assesslets or Used Report Assesslets. Click on one of the entries to open them in the Assesslet Content view.

"Used Assesslets" menu does not list the "Trigger Rule B" that is not assigned to Test Case_002

Assesslets and report assesslets that are disabled in the Assesslet Content view, that is these assesslets are deactivated in the TPT project, are displayed in a gray color. They can also be recognized by the additional word [DISABLED].

Assesslets and report assesslets that are deactivated for the selected variant or test case are not listed in the context menu, see also Activate and deactivate Assesslets.